<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorator="layout/default">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>客户详情</title>
</head>
<body>
	<div layout:fragment="content">
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 xol-xs-12">
				<div class="panel panel-success">
					<div class="panel-heading">
						基本信息
						<div class="btn-toolbar pull-right hidden-print">
							<div class="btn-group btn-group-xs">
								<a class="btn btn-default" th:href="@{/customers}">返回列表</a>
							</div>
						</div>
					</div>
					<div class="panel-body">
						<ul class="data-list">
							<li><label>客户代码</label> <span
								th:text="${customer.accountNumber}"></span></li>
							<li><label>国家代码</label> <span th:text="${customer.country}"></span>
							</li>
							<li><label>客户名称</label> <span
								th:text="${customer.customerName}"></span></li>
							<li><label>创建时间</label> <span
								th:text="${#dates.format(customer.createdTime, 'yyyy-MM-dd HH:mm:ss')}"></span></li>
							<li><label>更新时间</label> <span
								th:text="${#dates.format(customer.updateTime, 'yyyy-MM-dd HH:mm:ss')}"></span></li>

						</ul>
					</div>
				</div>
			</div>
		</div>
		<div class="row" th:unless="${#lists.isEmpty(customer.billTo)}">
			<div class="col-lg-12 col-md-12 col-sm-12 xol-xs-12">
				<div class="panel panel-success">
					<div class="panel-heading">发票地址</div>
					<div class="table-responsive">
						<table class="table table-striped table-hover table-condensed">
							<thead>
								<tr>
									<th>地址编号</th>
									<th>业务工厂</th>
									<th>详细地址</th>
									<th>创建时间</th>
									<th>更新时间</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="site : ${customer.billTo}" th:object="${site}">
									<td th:text="*{siteId}"></td>
									<td th:text="*{operationUnitId} + '- ' + *{operationUnitName}"></td>
									<td th:text="*{address}"></td>
									<td
										th:text="*{#dates.format(createdTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
									<td
										th:text="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>

		<div class="row" th:unless="${#lists.isEmpty(customer.shipTo)}">
			<div class="col-lg-12 col-md-12 col-sm-12 xol-xs-12">
				<div class="panel panel-success">
					<div class="panel-heading">收货地址</div>
					<div class="table-responsive">
						<table class="table table-striped table-hover table-condensed">
							<thead>
								<tr>
									<th>地址编号</th>
									<th>业务工厂</th>
									<th>详细地址</th>
									<th>创建时间</th>
									<th>更新时间</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="site : ${customer.shipTo}" th:object="${site}">
									<td th:text="*{siteId}"></td>
									<td th:text="*{operationUnitId} + '- ' + *{operationUnitName}"></td>
									<td th:text="*{address}"></td>
									<td
										th:text="*{#dates.format(createdTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
									<td
										th:text="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>

		<div class="row" th:if="${not #lists.isEmpty(customer.deliverTo)}">
			<div class="col-lg-12 col-md-12 col-sm-12 xol-xs-12">
				<div class="panel panel-success">
					<div class="panel-heading">发运地址</div>
					<div class="table-responsive">
						<table class="table table-striped table-hover table-condensed">
							<thead>
								<tr>
									<th>地址编号</th>
									<th>业务工厂</th>
									<th>详细地址</th>
									<th>创建时间</th>
									<th>更新时间</th>
								</tr>
							</thead>
							<tbody>
								<tr th:each="site : ${customer.deliverTo}" th:object="${site}">
									<td th:text="*{siteId}"></td>
									<td th:text="*{operationUnitId} + '- ' + *{operationUnitName}"></td>
									<td th:text="*{address}"></td>
									<td
										th:text="*{#dates.format(createdTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
									<td
										th:text="*{#dates.format(updateTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>

		<div class="row">
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 table-responsive">
				<div class="panel panel-success">
					<div class="panel-heading">接洽人员</div>
					<div th:if="${not #lists.isEmpty(employeese)}"
						th:replace="employee/index::showEmployeese(${employeese}, false)"></div>
					<p class="text-center text-warning"
						style="padding-top: 1rem; padding-bottom: 2rem;"
						th:if="${#lists.isEmpty(employeese)}">
						<small>哇喔〜〜〜，目前系统中还没有为您指定接洽人员。</small>
					</p>
				</div>
			</div>
			<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 table-responsive">
				<div class="panel panel-success">
					<div class="panel-heading">可用价格表</div>
					<div th:unless="${#lists.isEmpty(priceList)}"
						th:replace="price/index::showPriceList(${priceList})"></div>
					<p class="text-center text-warning"
						style="padding-top: 1rem; padding-bottom: 2rem;"
						th:if="${#lists.isEmpty(priceList)}">
						<small>太遗憾了，目前系统中还没有为您指定可用的价格表。</small>
					</p>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
